package com.sa.ibiz.demo.mob.controller;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sa.ibiz.demo.ibizutil.domain.ActionResult;
import com.sa.ibiz.demo.ibizutil.domain.CodeList;
import com.sa.ibiz.demo.ibizutil.errors.BadRequestAlertException;
import org.springframework.validation.annotation.Validated;
import org.springframework.http.ResponseEntity;

@RestController
@RequestMapping("/mob/app/codelist")
public class MobCodeListController{

	@Resource(name="WorkflowMob_QJSPStateCodeList")
	private com.sa.ibiz.demo.demo.codelist.QJSPStateCodeList workflowMob_QJSPStateCodeList;


	@Resource(name="WorkflowMob_YesNoCodeList")
	private com.sa.ibiz.demo.demo.codelist.YesNoCodeList workflowMob_YesNoCodeList;


	@Resource(name="WorkflowMob_CodeList81CodeList")
	private com.sa.ibiz.demo.demo.codelist.CodeList81CodeList workflowMob_CodeList81CodeList;



	@RequestMapping("workflowmob/qjspstate")
    public ResponseEntity<CodeList> getWorkflowMob_QJSPStateCodeList(){
    	return ResponseEntity.ok().body(workflowMob_QJSPStateCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/yesno")
    public ResponseEntity<CodeList> getWorkflowMob_YesNoCodeList(){
    	return ResponseEntity.ok().body(workflowMob_YesNoCodeList.getCodeList());
	}
	@RequestMapping("workflowmob/codelist81")
    public ResponseEntity<CodeList> getWorkflowMob_CodeList81CodeList(){
    	return ResponseEntity.ok().body(workflowMob_CodeList81CodeList.getCodeList());
	}

	@RequestMapping("getall")
    public ResponseEntity<List<CodeList>> getAll(){
     List<CodeList> list = new ArrayList<CodeList>();
    list.add(workflowMob_QJSPStateCodeList.getCodeList());
    list.add(workflowMob_YesNoCodeList.getCodeList());
    list.add(workflowMob_CodeList81CodeList.getCodeList());
    	return ResponseEntity.ok().body(list);
	}
}